<template>
  <transition name="fade">
    <div v-if="visible" class="modal-overlay" >

      <div class="modal-content" v-if="title=='会员提醒'">
        <button @click="close" class="close-btn1">×</button>
        <div class="modal-footer">
          <button @click="confirm" class="confirm-btn">立即解锁</button>
        </div>
      </div>
      <div class="modal-contents" v-else>
        <button @click="close" class="close-btn">×</button>
        <div class="mo_top">
           <el-image :src="logoImage" />
        </div>
          <TabComponent />
      </div>
    </div>

  </transition>
</template>

<script lang="ts" setup>
import { ref, defineProps, defineEmits } from 'vue';
import logoImage from '@/assets/images/liwu_top.png';
const props = defineProps<{
  title: string;
  visible: boolean;
}>();

const emit = defineEmits(['update:visible', 'confirm', 'cancel']);

const close = () => {
  emit('update:visible', false);
  emit('cancel');
};

const confirm = () => {
  emit('confirm');
};
</script>

<style scoped>
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  position: relative; /* 关键：让子元素绝对定位相对于它 */
  background: url("@/assets/images/liwu.png") no-repeat;
  width: 755px;
  height: 488px;
}
.modal-contents{
  width: 729px;
height: 452px;
position: relative;
background: url("@/assets/images/image_1.png") no-repeat center 147px #fff;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #eee;
}
.close-btn1 {
  position: absolute;
  top: 0px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}
.close-btn {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  position: absolute;
  right: 11px;
  top: 19px;
  color: #fff;
  z-index: 999;
}

.modal-body {
  padding: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 16px;
}

.cancel-btn,
.confirm-btn {
 width: 136px;
 line-height: 40px;
 text-align: center;
 margin-top: 350px;
 margin-right: 161px;
  border: none;
  font-size: 16px;
background: linear-gradient(180deg, rgba(255, 122, 87, 1) 5.56%, rgba(255, 69, 48, 1) 100%);
color: #fff;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 8px;
}

.cancel-btn {
  background-color: #f0f0f0;
  color: #333;
}

.confirm-btn {
  background-color: #409eff;
  color: white;
}

.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.3s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}
</style>
